<?php
class X2FlowRecordDelete extends X2FlowAction {
	public $title = 'Delete Record';
	public $info = 'Permanently delete this record.';
	
	public function paramRules() {
		return array(
			'title' => Yii::t('studio',$this->title),
			'info' => Yii::t('studio',$this->info),
			'modelRequired' => 1,
			'options' => array()
		);
	}
	
	public function execute(&$params) {
        if ($params['model']->delete()) {
            return array (true, "");
        } else {
            return array (false, "");
        }

	}
}
